﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XYW.WebSite;

namespace xyw
{
    public partial class NewsPage : System.Web.UI.Page
    {
        public XYW.BLL.News bllNews = new XYW.BLL.News();
        public XYW.Model.News modelNews = new XYW.Model.News();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }

        private void BindData()
        {
            int id = SiteAbout.gInt("id");
            if (id != 0)
            {
                modelNews = bllNews.GetModel(id);
            }
            else
                ClientScript.RegisterClientScriptBlock(this.GetType(), "no", "<script>alert('NO NEWS FOUND!')</script>)");
        }
    }
}